<?php
// +----------------------------------------------------------------------
//            -------------------------
//           /   / ----------------\  \
//          /   /             \  \
//         /   /              /  /
//        /   /    /-------------- /  /
//       /   /    /-------------------\  \
//      /   /                   \  \
//     /   /                     \  \
//    /   /                      /  /
//   /   /      /----------------------- /  /
//  /-----/      /---------------------------/
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://baimifan.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: Sage 2016/7/1  14:37
// +----------------------------------------------------------------------
namespace Common\Model;
use Think\Model\ViewModel;

class OrderBookView  extends ViewModel{
    protected $tableName ='Order_book';
    public $viewFields = array(
        'Apply'=>array('apply_id','user_id','name','sex','identity','referrer','weixin','phone','age','livecity','field_survey','field_must','create_time','barcode','group_no','join_time','_type'=>'LEFT'),
        'Class'=>array('class_id','is_public','score_max','class_type','apply_type','class_name','class_describe','class_logo','money'=>'class_money','class_start','class_end','apply_start','apply_end','qrcode_apply','public_article','refund_time'=>'class_refund_time','sign_time','class_address','contact_phone','info_room','_on'=>'Apply.class_id=Class.class_id','_type'=>'LEFT'),
        'Orders'=>array('order_id','status'=>'order_status','money'=>'order_money','score_deduct','create_time'=>'order_create_time','_on'=>'Apply.order_id=Orders.order_id','_type'=>'LEFT'),
        'Pay'=>array('pay_id','status'=>'pay_status','pay_way','summary','money'=>'pay_money','transaction_id','money_real','pay_time','pay_notice','_on'=>'Orders.pay_id=Pay.pay_id','_type'=>'LEFT'),
        'Area'=>array('city','_on'=>'Class.area_id=Area.area_id','_type'=>'LEFT'),
        'Refund'=>array('refund_reason','status'=>'refund_status','refund_money','refund_real','create_time'=>'refund_create_time','refund_time','_on'=>'Refund.refund_id=Orders.refund_id','_type'=>'LEFT'),
        'Class_type'=>array('type_id','name'=>'class_type_name','_on'=>'Class.class_type=Class_type.type_id')
    );
}